<template>
	<view class="">
		<view class="head" :style="{ paddingTop: $safeArea.top + 10 + 'px' }">
			<view class="info flex-justify-between">
				<view class="flex-item-center">
					<view class="profile">
						<!-- {{user}} -->
						<image class="profile" :src="user.avatar" />
					</view>
					<view class="name">
						<view class="bold">{{user.name}}</view>
						<view class="font-26">
							暂未填写公司
						</view>
						<view class="flex-item-center font-20 m-t-6" style="font-weight: 200;">
							<view class="m-r-22">
								关注0
							</view>
							<view class="m-r-22">
								粉丝0
							</view>
							<view class="m-r-22">
								收藏0
							</view>
						</view>
					</view>
				</view>
				<view class="my_home" @click="gotoMyhome">
					<u-icon name="arrow-right" color="#fff" size="20" />
				</view>
			</view>
			<view class="vip-info flex-justify-between">
				<view class="" style="color: #f1d19f;">
					<view class="flex-item-center">
						<image src="../../static/wan_vip.png" mode=""></image>
						<view class="bold">
							会员中心
						</view>
					</view>
					<view class="font-22 m-t-10">
						开通会员，立享受18项特权
					</view>
					
				</view>
				<!-- <view class="open-btn">
					立即开通
				</view> -->
			</view>
		</view>
		<view class="m-30 p-30 bgf" style="border-radius: 30rpx;">
			<view class="font-40 m-b-30">
				我的发布
			</view>
			<view class="flex-justify-between">
				<view class="item s-flex-direction flex-center" v-for="(item, index) in homeList"
					@click="gotoPage(item)" :key="index">
					<view class="font-36 bold">0</view>
					<view class="">{{ item.name }}</view>
				</view>
			</view>
		</view>

		<view class="m-30 p-30 bgf" style="border-radius: 30rpx;">
			<view class="font-40 m-b-30">
				常用功能
			</view>
			<view class="flex-justify-between">
				<view class="item s-flex-direction flex-center" v-for="(item, index) in orderList"
					@click="gotoPage(item)" :key="index">
					<!-- <view class="font-36 bold">0</view> -->
					<image :src="item.img" mode="" style="width: 70rpx;height: 70rpx"></image>
					<view class="m-t-20">{{ item.name }}</view>
				</view>
			</view>
		</view>
		<view class="m-30 p-30 bgf" style="border-radius: 30rpx;">
			<view class="font-40 m-b-30">
				更多工具
			</view>
			<view class="flex-justify-between">
				<view class="item s-flex-direction flex-center" v-for="(item, index) in moreList"
					@click="gotoPage(item)" :key="index">
					<!-- <view class="font-36 bold">0</view> -->
					<image :src="item.img" mode="" style="width: 50rpx;height: 50rpx"></image>
					<view class="m-t-20">{{ item.name }}</view>
				</view>
			</view>
		</view>



	</view>
</template>

<script>
	import dayJs from "dayjs";
	import constant from "@/constant";
	import {
		mapState
	} from "vuex";
	export default {
		computed: {},
		data() {
			return {
				isVip: false,
				phone: "",
				user:JSON.parse(uni.getStorageSync("user")),
				homeList: [

					{
						name: "我的商机",
						num: "0",
					},
					{
						name: "我的商品",
						num: "0",
					},
					{
						name: "我的货源",
						num: "0",
					},
					{
						name: "我的采购",
						num: "0",
					},
				],
				orderList: [{
						name: "我的订单",
						img: require('@/static/dingdan.png'),
						// url: "/views/my/my-order/index?type=all",
					},
					{
						name: "我的店铺",
						img: require('@/static/dianpu.png'),
						// url: "/views/my/my-order/index?type=effective",
					},
					{
						name: "我的钱包",
						img: require('@/static/qianbao.png'),
						// url: "/views/my/my-order/index?type=expire",
					},
					{
						name: "优惠券",
						img: require('@/static/youhuiquan.png'),
						// url: "/views/my/my-order/index?type=expire",
					},
				],
				moreList: [{
						name: "分享名片",
						img: require('@/static/fenxiang.png'),
						// url: "/views/my/my-order/index?type=all",
					},
					{
						name: "我的二维码",
						img: require('@/static/erweima.png'),
						// url: "/views/my/my-order/index?type=effective",
					},
					{
						name: "收货地址",
						img: require('@/static/dizhi.png'),
						// url: "/views/my/my-order/index?type=expire",
					},
					{
						name: "会员中心",
						img: require('@/static/huiyuan.png'),
						// url: "/views/my/my-order/index?type=expire",
					},
				],

			};
		},
		onLoad() {
		
		},

		onShow() {


		},
		methods: {
			dayJs,


		},

	};
</script>

<style lang="scss" scoped>
	.head {
		background: #3b70e9;
		display: flex;
		flex-direction: column;
		padding: 30rpx;
		// box-sizing: border-box;
		color: #fff;
		// gap: 20rpx;

		.info {
			height: 150rpx;
			width: 100%;
			padding: 0 20rpx;
			display: flex;

			align-items: center;
			box-sizing: border-box;

			.profile {
				height: 150rpx;
				width: 150rpx;
				border-radius: 75rpx;
				background-color: white;
			}

			.name {
				font-size: 36rpx;
				padding: 0 20rpx;
				// font-weight: bold;

				>view {
					&:nth-child(1) {
						display: flex;
						align-items: center;
					}
				}

				// color: white
			}

		}

		.vip-info{
			padding: 30rpx;
			height: 70rpx;
			// width: 100%;
			border-radius: 30rpx;
			background: url('../../static/vip-bgc.jpg') no-repeat;
			background-size: cover;
			margin-top: 40rpx;
			// .open-btn {
			// 	background-image: linear-gradient(#f1d19f,#ebbd81);
			// 	padding: 30rpx;
			// 	border-radius: 40rpx;
			// 	color: #271e1c;	

			// }
			image{
				width: 40rpx;
				height: 40rpx;
				margin-right: 6rpx;
			}
		}

		// .my {
		// 	display: flex;
		// 	align-items: center;
		// 	padding: 20rpx 16rpx;
		// }
	}
</style>